<%@page pageEncoding="ISO-8859-1"%>
<%@taglib uri="/WEB-INF/tld/nicasio.tld" prefix="n"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<n:header moduleName="admin" featureName="sysadmin"/>
<f:view>
	<h:form>
		<center>
			<n:String key="define.permissions.for.group"/> ${DefinePermissions.group.name}:
			<br/><br/>

			<table cellpadding="2" cellspacing="2">
				<th align="left"><n:String key="feature"/></th>
				<th align="left"><n:String key="have.permission"/></th>
				<c:forEach var="module" items="${DefinePermissions.modFeatures}">
					<tr>
						<td colspan="2"><b>${module.key.name}</b></td>
					</tr>
					<c:forEach var="feature" items="${module.value}">
						<c:forEach var="feat" items="${feature}">
							<tr>
								<td>
									${feat.key.name}
								</td>
								<td>
									<c:set var="yselect" value="" />
									<c:set var="nselect" value="" />
									<c:if test="${feat.value eq 'Y'}">
										<c:set var="yselect" value="checked"/>
									</c:if>
									<c:if test="${feat.value eq 'N'}">
										<c:set var="nselect" value="checked"/>
									</c:if>
									<input type="radio" name="${module.key.name}.${feat.key.name}" ${yselect} value="Y">${Application.yesString}</input>
									<input type="radio" name="${module.key.name}.${feat.key.name}" ${nselect} value="N">${Application.notString}</input>
								</td>
							</tr>
						</c:forEach>
					</c:forEach>
				</c:forEach>
			</table>
			<br/>
			<h:inputHidden value="#{DefinePermissions.groupId}"/>
			<h:commandButton action="#{DefinePermissions.save}" value="#{Application.saveString}"></h:commandButton>
		</center>
	</h:form>
</f:view>
<n:footer moduleName="admin" featureName="sysadmin"/>
